package com.xmtlxx.tms.mapper;

import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.tms.domain.OrderLog;
import com.xmtlxx.tms.domain.bo.OrderLogBo;
import com.xmtlxx.tms.domain.vo.OrderLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单日志Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface OrderLogMapper extends BaseMapperPlus<OrderLogMapper, OrderLog, OrderLogVo> {
    /**
     * 根据条件分页查询订单日志
     *
     * @param orderLog 订单日志
     * @return Page OrderLog
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "o.create_by"),
//        @DataColumn(key = "deptName", value = "o.dept_id"),
//        @DataColumn(key = "userName", value = "o.create_by")
//    })
    Page<OrderLogVo> selectPageOrderLogList(@Param("page") Page<OrderLog> page,@Param("orderLog") OrderLogBo orderLog);

    /**
     * 查询订单日志列表
     *
     * @param orderLog 订单日志
     * @return 订单日志集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "o.create_by"),
//        @DataColumn(key = "deptName", value = "o.dept_id"),
//        @DataColumn(key = "userName", value = "o.create_by")
//    })
    List<OrderLogVo> selectOrderLogList(@Param("orderLog") OrderLogBo orderLog);

    List<OrderLogVo> selectOrderLogs(String orderId);

    List<OrderLog> selectOrderLogsById(String orderId);

    OrderLogVo selectOrderLogVoByID(String id);

    int updateOrderLog(@Param("orderLog") OrderLog orderLog);

    int updateOrderLogBatchById(@Param("list") List<OrderLog> orderLogs);

    int removeOrderLogBatch(@Param("list") List<OrderLog> orderLogs);
}
